﻿/* Open source distributed without warranties of any kind. */

namespace Transcriber.Api
{
    #region Using
    using System;
    using System.Windows.Forms;
    #endregion

    /// <summary>
    /// Interface implemented by transcriber plug-ins.
    /// </summary>
    /// <remarks>
    /// Objects that implement this interface can be plugged into
    /// the Transcriber application at run time.
    /// </remarks>
    public interface ITranscriberPlugin : IDisposable
    {
        /// <summary>
        /// Gets the name of this plug-in object.
        /// </summary>
        /// <value>The name.</value>
        string Name { get; }

        /// <summary>
        /// Gets the transcriber.
        /// </summary>
        /// <value>The transcriber.</value>
        ITranscriberApplication Transcriber { get; }

        /// <summary>
        /// Transforms the given <paramref name="text"/>.
        /// </summary>
        /// <param name="text">The source text.</param>
        /// <returns>The transformed text.</returns>
        string Transcribe(string text);

        /// <summary>
        /// Gets the settings dialog.
        /// </summary>
        /// <returns>The settings dialog.</returns>
        Form GetSettingsDialog();

        /// <summary>
        /// Gets the destination context menu items.
        /// </summary>
        /// <returns>The destination context menu items.</returns>
        ToolStripItem[] GetDestinationContextMenuItems();

        /// <summary>
        /// Gets the source context menu items.
        /// </summary>
        /// <returns>The source context menu items.</returns>
        ToolStripItem[] GetSourceContextMenuItems();
    }
}
